package com.lvm.app.task;

import java.util.UUID;
import java.util.concurrent.TimeUnit;

public class TestTask {

    public static void main(String[] args) {
        VideoTaskExecutor executor = new VideoTaskExecutor();
        for(int i=0;i<20;i++){
            VideoTask v = new VideoTask(null,null);
            v.setTaskId(UUID.randomUUID().toString());
            try{
                executor.addTask(v);
            }catch (InterruptedException e){
                e.printStackTrace();
            }
        }
        while (true){
            try {
                TimeUnit.SECONDS.sleep(2);
            }catch (Exception e){
                e.printStackTrace();
            }

        }
    }
}
